package org.zsl.service;

import org.springframework.stereotype.Service;
import org.zsl.model.ResponseMsg;
import org.zsl.model.User;

import java.util.ArrayList;
import java.util.List;

@Service
public class UserService2 {


    public ResponseMsg add() {

         ResponseMsg responseMsg = new ResponseMsg();
          responseMsg.setSuccess(true);

        return  responseMsg;
    }

    public ResponseMsg login(User user) {

        ResponseMsg responseMsg = new ResponseMsg();
        responseMsg.setSuccess(true);

        return  responseMsg;
    }

    public List<User> getList(){

        List<User> list = new ArrayList<>();
        User user1 = new User();
        user1.setUsername("admin");
        user1.setPassword("123");

        User user2 = new User();
        user2.setUsername("test");
        user2.setPassword("123");

        User user3 = new User();
        user3.setUsername("test002");
        user3.setPassword("123");

        list.add(user1);
        list.add(user2);
        list.add(user3);

        return list;
    }

}
